<!--jquery-->
<script src="/plugin/jquery/jquery-3.1.1.min.js"></script>
<!--select2-->
<script src="/plugin/select2/select2.full.min.js"></script>
<!--layui-->
<script src="/plugin/layui/layui.js"></script>
<script>
    layui.use(['layer','element'],function () {
        $("#btn-exit").on("click", function () {
            layer.confirm('确定是否退出登录？', {
                icon: 3,
                title: '提示'
            }, function () {
                $.ajax({
                    type: 'get',
                    url: '/yige/logout.json'
                }).done(function (data) {
                    if(data.success){
                        window.location.href="/yige/login.html";
                    }
                });
            });
        });
    });
</script>
